package action;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;


public class SimpleLogin {
	
	public SimpleLogin()
	{
try{
			
			Class.forName("com.mysql.jdbc.Driver");
			String url="jdbc:mysql://localhost:3306/test";
			Connection con = DriverManager.getConnection(url,"root","root");
			
			Statement st= con.createStatement();
			
			ResultSet rs= st.executeQuery("Select * from userlogin");
			
			while(rs.next())
			{
				System.out.println("User Name= "+rs.getString(1));
				System.out.println("Password= "+rs.getString(2));
				
			}

			rs.close();
			con.close();
			
			
			
			
		}catch(Exception e){
			
			e.printStackTrace();
			
		}
		finally{
			
			
		}
	}

}
